-- GENERATED SPELL FOR [Phantom Guest] --


function spell0_16409(pUnit, Event) --@Curse of Agony,n/a--
pUnit:FullCastSpellOnTarget(29930,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16409', 30000, 1)
end

function spell1_16409(pUnit, Event) --@Dance Vibe,Self--
pUnit:FullCastSpellOnTarget(29521,pUnit)
pUnit:RegisterEvent('Sorts_16409', 605, 1)
end

function spell2_16409(pUnit, Event) --@Goblin Dragon Gun,Self--
pUnit:FullCastSpellOnTarget(29513,pUnit)
pUnit:RegisterEvent('Sorts_16409', 8000, 1)
end

function spell3_16409(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(29580,pUnit)
pUnit:RegisterEvent('Sorts_16409', 3500, 1)
end

function spell4_16409(pUnit, Event) --@Holy Nova,Self--
pUnit:FullCastSpellOnTarget(29514,pUnit)
pUnit:RegisterEvent('Sorts_16409', 687, 1)
end

function spell5_16409(pUnit, Event) --@Immolate,n/a--
pUnit:FullCastSpellOnTarget(29928,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16409', 23000, 1)
end

function spell6_16409(pUnit, Event) --@Impale,n/a--
pUnit:FullCastSpellOnTarget(29583,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16409', 9000, 1)
end

function spell7_16409(pUnit, Event) --@Punch,n/a--
pUnit:FullCastSpellOnTarget(29581,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16409', 522, 1)
end

function spell8_16409(pUnit, Event) --@Searing Pain,n/a--
pUnit:FullCastSpellOnTarget(29492,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16409', 1500, 1)
end

function spell9_16409(pUnit, Event) --@Throw,n/a--
pUnit:FullCastSpellOnTarget(29582,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16409', 542, 1)
end

function spell10_16409(pUnit, Event) --@Throw Dynamite,n/a--
pUnit:FullCastSpellOnTarget(29579,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16409', 2000, 1)
end

function Sorts_16409(pUnit, Event)
local choix_sorts_16409 = math.random(0, 10)
if choix_sorts_16409 == 0 then
pUnit:RegisterEvent('spell0_16409', 1, 1)
end
if choix_sorts_16409 == 1 then
pUnit:RegisterEvent('spell1_16409', 1, 1)
end
if choix_sorts_16409 == 2 then
pUnit:RegisterEvent('spell2_16409', 1, 1)
end
if choix_sorts_16409 == 3 then
pUnit:RegisterEvent('spell3_16409', 1, 1)
end
if choix_sorts_16409 == 4 then
pUnit:RegisterEvent('spell4_16409', 1, 1)
end
if choix_sorts_16409 == 5 then
pUnit:RegisterEvent('spell5_16409', 1, 1)
end
if choix_sorts_16409 == 6 then
pUnit:RegisterEvent('spell6_16409', 1, 1)
end
if choix_sorts_16409 == 7 then
pUnit:RegisterEvent('spell7_16409', 1, 1)
end
if choix_sorts_16409 == 8 then
pUnit:RegisterEvent('spell8_16409', 1, 1)
end
if choix_sorts_16409 == 9 then
pUnit:RegisterEvent('spell9_16409', 1, 1)
end
if choix_sorts_16409 == 10 then
pUnit:RegisterEvent('spell10_16409', 1, 1)
end
end

function mob16409_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16409', math.random(1500, 3000), 1)
end

function mob16409_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16409_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16409_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16409, 1, 'mob16409_Action')
RegisterUnitEvent(16409, 2, 'mob16409_Leave')
RegisterUnitEvent(16409, 3, 'mob16409_Kill')
RegisterUnitEvent(16409, 4, 'mob16409_Die')
